import {createFileRoute, Link, Outlet} from '@tanstack/react-router'
import {useState} from 'react';



export const Route = createFileRoute('/floors')({
  component: Floors,
})

function Floors  ()  {

    const [page,setPage]  = useState(1)


    return (
        <div>
            <h1>Floors</h1>
            <Link to={`/floors/${page-1}`} onClick={() => {
                setPage(page-1)
            }} className="[&.active]:font-bold">
                prev
            </Link>
            <Link to={`/floors/${page+1}`} onClick={() => {
                setPage(page+1)
            }} className="[&.active]:font-bold">
                next
            </Link>
            <Outlet />
        </div>
    )
}

